package com.itmuch.cloud.service;

import com.itmuch.cloud.entity.User;
import org.springframework.stereotype.Component;

/**
 * @author Aaron
 * @since 2020/12/25 16:37
 * <p>描述：回退类 FeignClientFallback 需要实现 Feign Client 接口</p>
 */
@Component
public class FeignClientFallback implements UserFeignClient {

    @Override
    public User findById(Long id) {
        User user = new User();
        user.setId(-1L);
        user.setName("默认用户");
        return user;
    }

}
